/*
Name: alternateShading.js
Author: Justin Williamson [epicoxymoron@gmail.com]
Description: Zebra-stripes any number of tables.  Created while working for International Programs Department
Last Modified: 10/14/2008
*/

function alternateShading(id) {
	for (var x = 0; x < arguments.length; x++) {
		var table = document.getElementById(arguments[x]);
		var rows = table.getElementsByTagName('tr');
		for (var i = 0; i < rows.length; i++) {
			rows[i].className = rows[i].className.replace(/unshaded/gi, '');
			rows[i].className = rows[i].className.replace(/shaded/gi, '');
			if (i % 2 == 0) rows[i].className += " shaded";
			else rows[i].className += " unshaded";
		}
	}
}
